package com.ssd.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * DateUtils 类
 *
 * @title:
 * @requirement:
 * @ClassName:
 * @author:首雯静
 * @creationTime:2024-11-29/11:40
 * @version: 1.0
 */
public class DateUtil {
    /**
     * 字符串转LocalDate类型
     * @param dateStr
     * @return
     */
    public static LocalDate parseLocalDate(String dateStr, String formatStr){
        DateTimeFormatter format = DateTimeFormatter.ofPattern(formatStr);
        LocalDate date = LocalDate.parse(dateStr,format);
        return date;
    }
}
